package com.yike.order.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单信息
 *
 * @author Sakura
 * @since 2024-08-23
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "退款列表信息")
public class RefundVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("订单状态: 0.待退款 1.已退款 2.退款失败")
    private Integer status;

    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("退款单号")
    private String refundNo;

    @ApiModelProperty("微信退款单号")
    private String wxRefundId;

    @ApiModelProperty("退款原因")
    private String refundDesc;

    @ApiModelProperty("失败原因")
    private String errorDesc;

    @NotBlank(message = "订单编号不能为空")
    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("支付方式:0:未支付 1.现金支付 2.储值支付 3.微信")
    private Integer payway;

    @ApiModelProperty("支付金额")
    private BigDecimal amount;

    @ApiModelProperty("设备编号")
    private String macNo;

    @ApiModelProperty("支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ApiModelProperty("微信订单号")
    private String wxTransactionId;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
